package com.googlecode.lookie.swing.tree.model;

import javax.swing.tree.TreeNode;

public abstract class DeferredTreeNode
    extends LazyTreeNode
{

    private boolean deferred = true;

    public DeferredTreeNode()
    {
        super();
    }

    public DeferredTreeNode( TreeNode parent )
    {
        super( parent );
    }

    public boolean isDeferred()
    {
        return deferred;
    }

    @Override
    public void clear()
    {
        super.clear();
        deferred = true;
    }

    public void fillWithPlaceholder( PlaceholderNode node )
    {
        super.fill( new TreeNode[] { node } );
    }

    public void fill( TreeNode[] nodes )
    {
        super.fill( nodes );
        deferred = false;
    }

}
